//
// ObjectARX defined commands

#include "StdAfx.h"
#include "StdArx.h"
#include "EntitySetOperation.h"
#include "SingleEntityOperation.h"
#include "UeEntityOperation.h"
// This is command 'TESTENTITYOPERATION'
EntitySetOperation g_EntitySetOp;
void TestEntityOperation()
{
	AcGePoint3d p1(100,100,200);
	AcGePoint3d p2(1100,1000,500);
	AcGeVector3d v(0,1,1);
	double dRadius = 500 ;

	CUEEntityOperation EntityOp;
	AcDbHandle EntityHandle;
	AcDbLine* pLine1 =new AcDbLine(p1,p2);
	EntityOp.AddEntityToDwg(pLine1);
	pLine1->getAcDbHandle(EntityHandle);
	g_EntitySetOp.Add(EntityHandle);

	AcDbCircle* pCircle = new AcDbCircle(p1 , v , dRadius);
	EntityOp.AddEntityToDwg(pCircle);
	pCircle->getAcDbHandle(EntityHandle);
	g_EntitySetOp.Add(EntityHandle);


}

void TestEntityModify()
{
	g_EntitySetOp.HightLight();
//	g_EntitySetOp.WriteXData(EquipType ,UeObjectId(8) ,UeObjectId(10));

	AcGePoint3d point(300,100,300);
	AcGeVector3d vAxis(3,0,1);
	double dAngle = 60;
	AcGeMatrix3d matrix;
	matrix.setToRotation(dAngle,vAxis,point);
	g_EntitySetOp.TransformBy(matrix);
}